package com.dys.controller;

import com.dys.service.CpService;
import com.dys.util.Cp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.xml.ws.soap.Addressing;
import java.util.List;

@RequestMapping("/order")
@Controller
public class OrderController {
    @Autowired
    CpService cpService;
    @RequestMapping("/getDishes")
    public String getAllCp(Model model){
        List<Cp> list = cpService.getAllCp();

        model.addAttribute("list",list);
        return "index";
    }
}
